/*************************************************************************************************************/
/** DECLARE DATA																							**/
/*************************************************************************************************************/

/* Object types */
local objType_Pistol				= ObjectType( 1, "Pistol", "secondary" )
local objType_SMG					= ObjectType( 2, "SMG", "secondary" )
local objType_Shotgun				= ObjectType( 3, "Shotgun", "primary" )
local objType_Rifle					= ObjectType( 4, "Rifle", "primary" )
local objType_Sniper				= ObjectType( 5, "Sniper", "primary" )
local objType_Inventory				= ObjectType( 6, "Inventory", "inventory" )
local objType_Turret				= ObjectType( 7, "Turret", "inventory" )
local objType_Barricade				= ObjectType( 8, "Barricade", "inventory" )

/* Object reference types */
local objRefType_SWEP				= ObjRefType( 1, "SWEP" )
local objRefType_STOOL				= ObjRefType( 2, "STOOL" )
local objRefType_SENT				= ObjRefType( 3, "SENT" )
local objRefType_Contraption		= ObjRefType( 4, "Contraption" )

/* Levels */
local lvlInfo_1						= LevelInfo( 1, 1000 )
local lvlInfo_2						= LevelInfo( 2, 2200 )
local lvlInfo_3						= LevelInfo( 3, 3500 )
local lvlInfo_4						= LevelInfo( 4, 4900 )
local lvlInfo_5						= LevelInfo( 5, 6400 )
local lvlInfo_6						= LevelInfo( 6, 8000 )
local lvlInfo_7						= LevelInfo( 7, 9700 )
local lvlInfo_8						= LevelInfo( 8, 11500 )
local lvlInfo_9						= LevelInfo( 9, 13400 )
local lvlInfo_10					= LevelInfo( 10, 15400 )
local lvlInfo_11					= LevelInfo( 11, 17500 )
local lvlInfo_12					= LevelInfo( 12, 19700 )
local lvlInfo_13					= LevelInfo( 13, 22000 )
local lvlInfo_14					= LevelInfo( 14, 24400 )
local lvlInfo_15					= LevelInfo( 15, 26900 )
local lvlInfo_16					= LevelInfo( 16, 29600 )
local lvlInfo_17					= LevelInfo( 17, 32500 )
local lvlInfo_18					= LevelInfo( 18, 35700 )
local lvlInfo_19					= LevelInfo( 19, 39200 )
local lvlInfo_20					= LevelInfo( 20, 43000 )
local lvlInfo_21					= LevelInfo( 21, 47100 )
local lvlInfo_22					= LevelInfo( 22, 51600 )
local lvlInfo_23					= LevelInfo( 23, 56600 )
local lvlInfo_24					= LevelInfo( 24, 62100 )
local lvlInfo_25					= LevelInfo( 25, 68100 )
local lvlInfo_26					= LevelInfo( 26, 74600 )
local lvlInfo_27					= LevelInfo( 27, 81600 )
local lvlInfo_28					= LevelInfo( 28, 89100 )
local lvlInfo_29					= LevelInfo( 29, 97100 )
local lvlInfo_30					= LevelInfo( 30, 105600 )
local lvlInfo_31					= LevelInfo( 31, 114600 )
local lvlInfo_32					= LevelInfo( 32, 124600 )
local lvlInfo_33					= LevelInfo( 33, 135600 )
local lvlInfo_34					= LevelInfo( 34, 148600 )
local lvlInfo_35					= LevelInfo( 35, 163600 )
local lvlInfo_36					= LevelInfo( 36, 181600 )
local lvlInfo_37					= LevelInfo( 37, 203600 )
local lvlInfo_38					= LevelInfo( 38, 229600 )
local lvlInfo_39					= LevelInfo( 39, 261600 )
local lvlInfo_40					= LevelInfo( 40, 301600 )
local lvlInfo_41					= LevelInfo( 41, 351600 )
local lvlInfo_42					= LevelInfo( 42, 413600 )
local lvlInfo_43					= LevelInfo( 43, 488600 )
local lvlInfo_44					= LevelInfo( 44, 573600 )
local lvlInfo_45					= LevelInfo( 45, 668600 )
local lvlInfo_46					= LevelInfo( 46, 778600 )
local lvlInfo_47					= LevelInfo( 47, 903600 )
local lvlInfo_48					= LevelInfo( 48, 950000 )
local lvlInfo_49					= LevelInfo( 49, 985000 )
local lvlInfo_50					= LevelInfo( 50, 1000000 )

/* Pistols */
local obj_SWEP_USP					= ObjectInfo( 1, "H&K USP", 50, 10, objType_Pistol, "weapon_bel_pistol_usp", objRefType_SWEP, 1000 )
local obj_SWEP_Glock18				= ObjectInfo( 2, "Glock 18", 50, 8, objType_Pistol, "weapon_bel_pistol_glock18", objRefType_SWEP, 1100 )
local obj_SWEP_FiveSeven			= ObjectInfo( 3, "Five-Seven", 50, 9, objType_Pistol, "weapon_bel_pistol_fiveseven", objRefType_SWEP, 1200 )
local obj_SWEP_P228					= ObjectInfo( 4, "P228", 60, 12, objType_Pistol, "weapon_bel_pistol_p228", objRefType_SWEP, 1500 )
local obj_SWEP_Deagle				= ObjectInfo( 5, "Desert Eagle", 80, 15, objType_Pistol, "weapon_bel_pistol_deagle", objRefType_SWEP, 2500 )

/* SMGs */

/* Shotguns */

/* Rifles */
local obj_SWEP_AK47					= ObjectInfo( 41, "AK47", 100, 25, objType_Rifle, "weapon_bel_rifle_ak47", objRefType_SWEP, 3200 )
local obj_SWEP_M4A1					= ObjectInfo( 42, "M4A1", 120, 30, objType_Rifle, "weapon_bel_rifle_m4a1", objRefType_SWEP, 3500 )

/* Sniper rifles */

/* Inventory */

/* Tools */

/* Entities */

/* Turrets */

/* Barricades */

/* Pistols upgrades */

/* SMGs upgrades */

/* Shotguns upgrades */

/* Rifles upgrades */

/* Sniper rifles upgrades */

/* Inventory upgrades */

/* Tools upgrades */

/* Entities upgrades */

/* Turrets upgrades */

/* Barricades upgrades */

/* Loadouts */
local loadout_DefAttacker			= Loadout( 1, "Attackers default loadout", obj_SWEP_M4A1, obj_SWEP_USP, nil, nil, nil, nil )
local loadout_DefDefender			= Loadout( 2, "Defenders default loadout", obj_SWEP_AK47, obj_SWEP_Glock18, nil, nil, nil, nil )
local loadout_DefPrisoner			= Loadout( 3, "Prisoners default loadout", nil, nil, nil, nil, nil, nil )
local loadout_DefSpectator			= Loadout( 1002, "Spectators default loadout", nil, nil, nil, nil, nil, nil )

/* Default admins */
local usrInfo_Local					= UserInfo( "STEAM_0:0:0", "admin", "123", 1 )


/*************************************************************************************************************/
/** INSERT DATA																								**/
/*************************************************************************************************************/

/* Create object types */
local function CreateObjectTypes()

	/* Object types */
	InsertObjectType( objType_Pistol )
	InsertObjectType( objType_SMG )
	InsertObjectType( objType_Shotgun )
	InsertObjectType( objType_Rifle )
	InsertObjectType( objType_Sniper )
	InsertObjectType( objType_Inventory )
	InsertObjectType( objType_Turret )
	InsertObjectType( objType_Barricade )
end

/* Create object reference types */
local function CreateObjRefTypes()

	/* Object reference types */
	InsertObjRefType( objRefType_SWEP )
	InsertObjRefType( objRefType_STOOL )
	InsertObjRefType( objRefType_SENT )
	InsertObjRefType( objRefType_Contraption )
end

/* Create levels */
local function CreateLevels()

	/* Levels */
	InsertLevelInfo( lvlInfo_1 )
	InsertLevelInfo( lvlInfo_2 )
	InsertLevelInfo( lvlInfo_3 )
	InsertLevelInfo( lvlInfo_4 )
	InsertLevelInfo( lvlInfo_5 )
	InsertLevelInfo( lvlInfo_6 )
	InsertLevelInfo( lvlInfo_7 )
	InsertLevelInfo( lvlInfo_8 )
	InsertLevelInfo( lvlInfo_9 )
	InsertLevelInfo( lvlInfo_10 )
	InsertLevelInfo( lvlInfo_11 )
	InsertLevelInfo( lvlInfo_12 )
	InsertLevelInfo( lvlInfo_13 )
	InsertLevelInfo( lvlInfo_14 )
	InsertLevelInfo( lvlInfo_15 )
	InsertLevelInfo( lvlInfo_16 )
	InsertLevelInfo( lvlInfo_17 )
	InsertLevelInfo( lvlInfo_18 )
	InsertLevelInfo( lvlInfo_19 )
	InsertLevelInfo( lvlInfo_20 )
	InsertLevelInfo( lvlInfo_21 )
	InsertLevelInfo( lvlInfo_22 )
	InsertLevelInfo( lvlInfo_23 )
	InsertLevelInfo( lvlInfo_24 )
	InsertLevelInfo( lvlInfo_25 )
	InsertLevelInfo( lvlInfo_26 )
	InsertLevelInfo( lvlInfo_27 )
	InsertLevelInfo( lvlInfo_28 )
	InsertLevelInfo( lvlInfo_29 )
	InsertLevelInfo( lvlInfo_30 )
	InsertLevelInfo( lvlInfo_31 )
	InsertLevelInfo( lvlInfo_32 )
	InsertLevelInfo( lvlInfo_33 )
	InsertLevelInfo( lvlInfo_34 )
	InsertLevelInfo( lvlInfo_35 )
	InsertLevelInfo( lvlInfo_36 )
	InsertLevelInfo( lvlInfo_37 )
	InsertLevelInfo( lvlInfo_38 )
	InsertLevelInfo( lvlInfo_39 )
	InsertLevelInfo( lvlInfo_40 )
	InsertLevelInfo( lvlInfo_41 )
	InsertLevelInfo( lvlInfo_42 )
	InsertLevelInfo( lvlInfo_43 )
	InsertLevelInfo( lvlInfo_44 )
	InsertLevelInfo( lvlInfo_45 )
	InsertLevelInfo( lvlInfo_46 )
	InsertLevelInfo( lvlInfo_47 )
	InsertLevelInfo( lvlInfo_48 )
	InsertLevelInfo( lvlInfo_49 )
	InsertLevelInfo( lvlInfo_50 )
end

/* Create objects */
local function CreateObjects()

	/* Pistols */
	InsertObjectInfo( obj_SWEP_USP )
	InsertObjectInfo( obj_SWEP_Glock18 )
	InsertObjectInfo( obj_SWEP_FiveSeven )
	InsertObjectInfo( obj_SWEP_P228 )
	InsertObjectInfo( obj_SWEP_Deagle )

	/* SMGs */

	/* Shotguns */

	/* Rifles */
	InsertObjectInfo( obj_SWEP_AK47 )
	InsertObjectInfo( obj_SWEP_M4A1 )

	/* Sniper rifles */

	/* Inventory */

	/* Tools */

	/* Entities */

	/* Turrets */

	/* Barricades */

	/* Pistols upgrades */

	/* SMGs upgrades */

	/* Shotguns upgrades */

	/* Rifles upgrades */

	/* Sniper rifles upgrades */

	/* Inventory upgrades */

	/* Tools upgrades */

	/* Entities upgrades */

	/* Turrets upgrades */

	/* Barricades upgrades */
end

/* Create upgrades */
local function CreateUpgrades()
end

/* Create loadouts */
local function CreateLoadouts()

	/* Loadouts */
	InsertLoadout( loadout_DefAttacker )
	InsertLoadout( loadout_DefDefender )
	InsertLoadout( loadout_DefPrisoner )
	InsertLoadout( loadout_DefSpectator )
end

/* Create users */
local function CreateUsers()

	/* Default admins */
	InsertUserInfo( usrInfo_Local )
end

/* Create all data */
GM.CreateData = function()

	/* Debug output */
	DEBUG:Msg( "-------------------------", "GM.CreateData" )
	DEBUG:Msg( "Started creating data ...", "GM.CreateData" )
	DEBUG:Msg( "-------------------------", "GM.CreateData" )
	
	/* Call functions */
	CreateObjectTypes()
	CreateObjRefTypes()
	CreateLevels()
	CreateObjects()
	CreateUpgrades()
	CreateLoadouts()
	CreateUsers()
	
	/* Debug output */
	DEBUG:Msg( "----------------------", "GM.CreateData" )
	DEBUG:Msg( "Finished creating data", "GM.CreateData" )
	DEBUG:Msg( "----------------------", "GM.CreateData" )
end